/*
 * @Description:
 * @Version: 1.0
 * @Author: liguansheng
 * @Date: 2022-08-25 17:08:30
 * @LastEditors: liguansheng
 * @LastEditTime: 2022-08-30 10:52:04
 */
export interface IClientAllowedCorsOrigin{
  clientId: string
  origin: string
}
export interface IClientAllowedGrantType{
  clientId: string
  grantType: string
}
export interface IClientAllowedScope{
  clientId: string
  scope: string
}
export interface IClientSecret{
  clientId: string
  description: string
  expiration: Date
  type: string
  value: string
}
export interface IClientPostLogoutRedirectUri{
  clientId: string
  postLogoutRedirectUri :string
}
export interface IClientRedirectUri{
  clientId: string
  redirectUri :string
}
export interface IClientClaim{
  type: string
  value: string
}
export interface IClientIdentityProviderRestriction{
  clientId: string
  provider: string
}
export interface IClientProperty{
  clientId: string
  key:string
  value: string
}
export interface IClient{
  absoluteRefreshTokenLifetime: number
  accessTokenLifetime: number
  accessTokenType: number
  allowAccessTokensViaBrowser: boolean
  allowOfflineAccess: boolean
  allowPlainTextPkce: boolean
  allowRememberConsent: boolean
  allowedCorsOrigins: IClientAllowedCorsOrigin[]
  allowedGrantTypes: IClientAllowedGrantType[]
  allowedIdentityTokenSigningAlgorithms: string
  allowedScopes: IClientAllowedScope[]
  alwaysIncludeUserClaimsInIdToken: boolean
  alwaysSendClientClaims: boolean
  authorizationCodeLifetime: number
  backChannelLogoutSessionRequired: boolean
  backChannelLogoutUri: string
  claims: IClientClaim[]
  clientClaimsPrefix: string
  clientId: string
  clientName: string
  clientSecrets: IClientSecret[]
  clientUri: string
  consentLifetime: number
  description: string
  deviceCodeLifetime: number
  enableLocalLogin: boolean
  enabled: boolean
  extraProperties: {}
  frontChannelLogoutSessionRequired: boolean
  frontChannelLogoutUri: string
  id: string
  identityProviderRestrictions: IClientIdentityProviderRestriction[]
  identityTokenLifetime: number
  includeJwtId: boolean
  logoUri: string
  pairWiseSubjectSalt: string
  postLogoutRedirectUris: IClientPostLogoutRedirectUri[]
  properties: IClientProperty[]
  protocolType: string
  redirectUris: IClientRedirectUri[]
  refreshTokenExpiration: number
  refreshTokenUsage: string
  requireClientSecret: boolean
  requireConsent: boolean
  requirePkce: boolean
  requireRequestObject: boolean
  slidingRefreshTokenLifetime: number
  updateAccessTokenClaimsOnRefresh: boolean
  userCodeType: string
  userSsoLifetime: number
}

export interface ICreateClientSecret{
  type: string
  value: string
  description: string
  expiration?: Date
}
export interface ICreateClient{
  clientId: string
  clientName: string
  description: string
  clientUri: string
  logoUri: string
  requireConsent: boolean
  callbackUrl: string
  logoutUrl: string
  scopes: string[]
  secrets: ICreateClientSecret[]
}

export interface IUpdateClientClaim{
  type: string
  value: string
}
export interface IUpdateProperty{
  key: string
  value: string
}
export interface IUpdateClientSecret{
  type: string
  value: string
  description: string
  expiration?: Date
}
export interface IUpdateClient{
  accessTokenLifeTime: number
  accessTokenType: number
  allowAccessTokensViaBrowser: boolean
  allowOfflineAccess: boolean
  allowRememberConsent: boolean
  allowedCorsOrigins: string[]
  allowedGrantTypes: string[]
  allowedIdentityTokenSigningAlgorithms: string
  alwaysSendClientClaims: boolean
  backChannelLogoutSessionRequired: boolean
  backChannelLogoutUri: string
  claims: IUpdateClientClaim[]
  clientName: string
  clientUri: string
  consentLifetime: number
  description: string
  deviceCodeLifetime: number
  enableLocalLogin: boolean
  enabled: boolean
  frontChannelLogoutSessionRequired: boolean
  frontChannelLogoutUri: string
  identityProviderRestrictions: string[]
  includeJwtId: boolean
  logoUri: string
  pairWiseSubjectSalt: string
  postLogoutRedirectUris: string[]
  properties: IUpdateProperty[]
  redirectUris: string[]
  requireClientSecret: boolean
  requireConsent: boolean
  requirePkce: boolean
  requireRequestObject: boolean
  scopes: string[]
  userCodeType: string
  userSsoLifetime: number
  clientSecrets: IUpdateClientSecret[]
}
